{extend name="../public/header" /}
{block name="body"}
<body>
{include file="../public/common" /}
<fieldset class="layui-elem-field site-demo-button" style="padding:10px;">
    <div class="layui-row">
        <div class="layui-col-xs4 layui-col-sm12 layui-col-md12">
            <!--  -->
            <div class="layui-tab">
                <ul class="layui-tab-title">
                    <li class="layui-this">基本信息</li>
                    <li>装备</li>
                    <li>道具</li>
                    <li>药品</li>
                    <li>技能</li>
                    <li>宠物</li>
                    <li>任务</li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">
                        <form id="form1" class="layui-form layui-form-pane" action="{:url('')}">
                            <div class="layui-form-item">
                                <label class="layui-form-label">VIP</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="vip" value="{$info.vip|default='0'}" placeholder="vip" class="layui-input">
                                </div>

                                <label class="layui-form-label">极品灵石</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="uczb" value="{$info.uczb|default='0'}" placeholder="充值" class="layui-input">
                                </div>

                                <label class="layui-form-label">灵石</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="uyxb" value="{$info.uyxb|default='0'}" placeholder="游戏币" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">昵称</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="uname" value="{$info.uname|default=''}" placeholder="昵称" class="layui-input">
                                </div>

                                <label class="layui-form-label">性别</label>
                                <div class="layui-input-inline">
                                    <input type="radio" name="usex" {eq name="$info.usex" value="1" }checked{/eq} title="男" value="1" checked />
                                    <input type="radio" name="usex" {eq name="$info.usex" value="2" }checked{/eq} title="女" value="2"/>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">等级</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="ulv" value="{$info.ulv|default='0'}" class="layui-input">
                                </div>

                                <label class="layui-form-label">修为</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="uexp" value="{$info.uexp|default='0'}" class="layui-input">
                                </div>
                            </div>
                            <fieldset class="layui-elem-field">
                                <legend>四维</legend>
                                <div class="layui-field-box">
                                    <div class="layui-row">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">体质</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="utz" value="{$info.utz|default='5'}" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">根骨</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="ugg" value="{$info.ugg|default='1'}" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">力量</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="ull" value="{$info.ull|default='1'}" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">敏捷</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="umj" value="{$info.umj|default='1'}" class="layui-input">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </fieldset>
                            <fieldset class="layui-elem-field">
                                <legend>基础属性</legend>
                                <div class="layui-field-box">
                                    <div class="layui-row">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">生命</label>
                                            <div class="layui-input-inline" style="width:83px;">
                                                <input type="text" name="uhp" value="{$info.uhp|default='0'}" placeholder="0" autocomplete="off" class="layui-input">
                                            </div>
                                            <div class="layui-form-mid">-</div>
                                            <div class="layui-input-inline" style="width:83px;">
                                                <input type="text" name="umaxhp" value="{$info.umaxhp|default='0'}" placeholder="0" autocomplete="off" class="layui-input">
                                            </div>

                                            <label class="layui-form-label">真元</label>
                                            <div class="layui-input-inline" style="width:83px;">
                                                <input type="text" name="ump" value="{$info.ump|default='0'}" placeholder="0" autocomplete="off" class="layui-input">
                                            </div>
                                            <div class="layui-form-mid">-</div>
                                            <div class="layui-input-inline" style="width:83px;">
                                                <input type="text" name="umaxmp" value="{$info.umaxmp|default='0'}" placeholder="0" autocomplete="off" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">攻击</label>
                                            <div class="layui-input-inline">
                                                <input type="text" value="{$info.ugj|default='0'}" disabled class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">法力</label>
                                            <div class="layui-input-inline">
                                                <input type="text" value="{$info.uwx|default='0'}" disabled class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">防御</label>
                                            <div class="layui-input-inline">
                                                <input type="text" value="{$info.ufy|default='0'}" disabled class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">暴击</label>
                                            <div class="layui-input-inline">
                                                <input type="text" value="{$info.ubj|default='0'}" disabled class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">速度</label>
                                            <div class="layui-input-inline">
                                                <input type="text" value="{$info.usd|default='0'}" disabled class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">闪避</label>
                                            <div class="layui-input-inline">
                                                <input type="text" value="{$info.usb|default='0'}" disabled class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">吸血</label>
                                            <div class="layui-input-inline">
                                                <input type="text" value="{$info.uxx|default='0'}" disabled class="layui-input">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </fieldset>
                            <fieldset class="layui-elem-field">
                                <legend>宠物增益</legend>
                                <div class="layui-field-box">
                                    <div class="layui-row">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">生命</label>
                                            <div class="layui-input-inline">
                                                <input type="text" value="{$info.infoPets.uphp|default='0'}" disabled class="layui-input">
                                            </div>

                                            <label class="layui-form-label">攻击</label>
                                            <div class="layui-input-inline">
                                                <input type="text" value="{$info.infoPets.upgj|default='0'}" disabled class="layui-input">
                                            </div>

                                            <label class="layui-form-label">防御</label>
                                            <div class="layui-input-inline">
                                                <input type="text" value="{$info.infoPets.upfy|default='0'}" disabled class="layui-input">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </fieldset>
                            <fieldset class="layui-elem-field">
                                <legend>其他</legend>
                                <div class="layui-field-box">
                                    <div class="layui-row">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">模式</label>
                                            <div class="layui-input-inline">
                                                <input type="radio" name="ispvp" {eq name="$info.ispvp" value="0" }checked{/eq} title="和平" value="0" checked />
                                                <input type="radio" name="ispvp" {eq name="$info.ispvp" value="1" }checked{/eq} title="攻击" value="1"/>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">当前位置</label>
                                            <div class="layui-input-inline">
                                                <input type="text" value="{$info.infoMapName|default=''}" disabled class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">注册时间</label>
                                            <div class="layui-input-inline">
                                                <input type="text" value="{:rttime($info.addtime)}" disabled class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">登录时间</label>
                                            <div class="layui-input-inline">
                                                <input type="text" value="{$info.endtime|default='0'}" disabled class="layui-input">
                                            </div>

                                            <label class="layui-form-label">在线</label>
                                            <div class="layui-input-inline">
                                                <input type="radio" name="sfzx" {eq name="$info.sfzx" value="0" }checked{/eq} title="否" value="0" checked />
                                                <input type="radio" name="sfzx" {eq name="$info.sfzx" value="1" }checked{/eq} title="是" value="1"/>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">修炼时间</label>
                                            <div class="layui-input-inline">
                                                <input type="text" value="{$info.xiuliantime|default=''}" disabled class="layui-input">
                                            </div>

                                            <label class="layui-form-label">是否修炼</label>
                                            <div class="layui-input-inline">
                                                <input type="radio" name="sfxl" {eq name="$info.sfxl" value="0" }checked{/eq} title="否" value="0" checked />
                                                <input type="radio" name="sfxl" {eq name="$info.sfxl" value="1" }checked{/eq} title="是" value="1"/>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">签到时间</label>
                                            <div class="layui-input-inline">
                                                <input type="text" value="{$info.qiandaotime|default=''}" disabled class="layui-input">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </fieldset>
                            <div class="layui-input-block">
                                <input type="hidden" name="uid" type="hidden" value="{$info.uid|default=''}">
                                <button class="layui-btn" lay-submit lay-filter="*">立即提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </form>
                    </div>
                    <div class="layui-tab-item">
                        <table class="layui-table" style="width: 700px; text-align: center;">
                            <colgroup>
                                <col width="150">
                                <col width="300">
                                <col width="150">
                                <col>
                            </colgroup>
                            <tbody>
                            <tr>
                                <td class="ajax-equip" data-value="{$info.tool2}">{$info.tool2Name}</td>
                                <td rowspan="3"><img src="/public/admin/image/role.jpg" style="width: 270px;max-width: none;"></td>
                                <td class="ajax-equip" data-value="{$info.tool5}">{$info.tool5Name}</td>
                                <td rowspan="3"></td>
                            </tr>
                            <tr>
                                <td class="ajax-equip" data-value="{$info.tool3}">{$info.tool3Name}</td>
                                <td class="ajax-equip" data-value="{$info.tool4}">{$info.tool4Name}</td>
                            </tr>
                            <tr>
                                <td class="ajax-equip" data-value="{$info.tool1}">{$info.tool1Name}</td>
                                <td class="ajax-equip" data-value="{$info.tool6}">{$info.tool6Name}</td>
                            </tr>
                            </tbody>
                        </table>
                        <table class="layui-table" lay-size="sm">
                            <thead>
                            <tr>
                                <th width="80">ID</th>
                                <th>名称</th>
                                <th>等级</th>
                                <th>详情</th>
                                <th width="320">属性[生命/攻击/防御/暴击/吸血/速度]</th>
                                <th>部位</th>
                                <th width="160">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {if(count($listRoleEquip)<1)}
                            <tr>
                                <td colspan="7" align="center">暂无相关数据</td>
                            </tr>
                            {else /}
                            {volist name='listRoleEquip' id='vo' key='k'}
                            <tr>
                                <td>{$vo.zbnowid}</td>
                                <td>{$vo.zbname}</td>
                                <td>{$vo.zblv}</td>
                                <td>{$vo.zbinfo}</td>
                                <td>
                                    <table lay-size="sm" style="text-align: center;width: 300px;">
                                        <tbody>
                                        <tr>
                                            <td width="20%">{$vo.zbhp}</td>
                                            <td width="20%">{$vo.zbgj}</td>
                                            <td width="20%">{$vo.zbfy}</td>
                                            <td width="10%">{$vo.zbbj}</td>
                                            <td width="10%">{$vo.zbxx}</td>
                                            <td width="20%">{$vo.zbsd}</td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </td>
                                <td>{$vo.zbtoolName}</td>
                                <td>
                                    <a class="layui-btn layui-btn-xs layui-btn-danger ajax-del" data-url='{:url("delEquip")}' data-field='id' data-value='{$vo.zbnowid}'>
                                        <i class="layui-icon">&#xe640;</i>删除
                                    </a>
                                </td>
                            </tr>
                            {/volist}
                            {/if}
                            </tbody>
                        </table>
                    </div>
                    <div class="layui-tab-item">
                        <table class="layui-table" lay-size="sm">
                            <thead>
                            <tr>
                                <th width="80">ID</th>
                                <th>名称</th>
                                <th>详情</th>
                                <th>种类</th>
                                <th>数量</th>
                                <th width="160">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {if(count($listRoleProp)<1)}
                            <tr>
                                <td colspan="6" align="center">暂无相关数据</td>
                            </tr>
                            {else /}
                            {volist name='listRoleProp' id='vo' key='k'}
                            <tr>
                                <td>{$vo.id}</td>
                                <td>{$vo.djname}</td>
                                <td>{$vo.djinfo}</td>
                                <td>{$vo.djzlName}</td>
                                <td>{$vo.djsum}</td>
                                <td>
                                    <a class="layui-btn layui-btn-xs ajax-edit" data-url="{:url('editProp')}" data-field='id' data-value='{$vo.id}'>
                                        <i class="layui-icon">&#xe642;</i>编辑
                                    </a>
                                    <a class="layui-btn layui-btn-xs layui-btn-danger ajax-del" data-url='{:url("delProp")}' data-field='id' data-value='{$vo.id}'>
                                        <i class="layui-icon">&#xe640;</i>删除
                                    </a>
                                </td>
                            </tr>
                            {/volist}
                            {/if}
                            </tbody>
                        </table>
                    </div>
                    <div class="layui-tab-item">
                        <table class="layui-table" lay-size="sm">
                            <thead>
                            <tr>
                                <th width="80">ID</th>
                                <th>名称</th>
                                <th>详情</th>
                                <th>等级</th>
                                <th>类型</th>
                                <th width="120">恢复[生命/气]</th>
                                <th>修为</th>
                                <th width="300">增益[攻击/防御/暴击/吸血/五行]</th>
                                <th>数量</th>
                                <th width="160">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {if(count($listRoleDrug)<1)}
                            <tr>
                                <td colspan="9" align="center">暂无相关数据</td>
                            </tr>
                            {else /}
                            {volist name='listRoleDrug' id='vo' key='k'}
                            <tr>
                                <td>{$vo.id}</td>
                                <td>{$vo.ypname}</td>
                                <td>{$vo.ypinfo}</td>
                                <td>{$vo.yplv}</td>
                                <td>{$vo.typeName}</td>
                                <td>
                                    <table lay-size="sm" style="width: 100%">
                                        <tbody>
                                        <tr>
                                            <td width="50%">{$vo.yphp}</td>
                                            <td width="50%">{$vo.ypmana}</td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </td>
                                <td>{$vo.exp}</td>
                                <td>
                                    <table lay-size="sm" style="width: 100%">
                                        <tbody>
                                        <tr>
                                            <td width="20%">{$vo.ypgj}</td>
                                            <td width="20%">{$vo.ypfy}</td>
                                            <td width="20%">{$vo.ypbj}</td>
                                            <td width="20%">{$vo.ypxx}</td>
                                            <td width="20%">{$vo.ypwx}</td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </td>
                                <td>{$vo.ypsum}</td>
                                <td>
                                    <a class="layui-btn layui-btn-xs ajax-edit" data-url="{:url('editDrug')}" data-field='id' data-value='{$vo.id}'>
                                        <i class="layui-icon">&#xe642;</i>编辑
                                    </a>
                                    <a class="layui-btn layui-btn-xs layui-btn-danger ajax-del" data-url='{:url("delDrug")}' data-field='id' data-value='{$vo.id}'>
                                        <i class="layui-icon">&#xe640;</i>删除
                                    </a>
                                </td>
                            </tr>
                            {/volist}
                            {/if}
                            </tbody>
                        </table>
                    </div>
                    <div class="layui-tab-item">
                        <table class="layui-table" lay-size="sm">
                            <thead>
                            <tr>
                                <th width="80">ID</th>
                                <th>名称</th>
                                <th>详情</th>
                                <th>等级</th>
                                <th width="320">效果[攻击/防御/暴击/吸血]</th>
                                <th>数量</th>
                                <th width="160">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {if(count($listRoleSkill)<1)}
                            <tr>
                                <td colspan="7" align="center">暂无相关数据</td>
                            </tr>
                            {else /}
                            {volist name='listRoleSkill' id='vo' key='k'}
                            <tr>
                                <td>{$vo.id}</td>
                                <td>{$vo.jnname}</td>
                                <td>{$vo.jninfo}</td>
                                <td>{$vo.jnlv}</td>
                                <td>
                                    <table lay-size="sm" style="text-align: center;width: 300px;">
                                        <tbody>
                                        <tr>
                                            <td width="20%">{$vo.jngj}</td>
                                            <td width="20%">{$vo.jnfy}</td>
                                            <td width="20%">{$vo.jnbj}</td>
                                            <td width="20%">{$vo.jnxx}</td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </td>
                                <td>{$vo.jncount}</td>
                                <td>
                                    <a class="layui-btn layui-btn-xs ajax-edit" data-url="{:url('editSkill')}" data-field='id' data-value='{$vo.id}'>
                                        <i class="layui-icon">&#xe642;</i>编辑
                                    </a>
                                    <a class="layui-btn layui-btn-xs layui-btn-danger ajax-del" data-url='{:url("delSkill")}' data-field='id' data-value='{$vo.id}'>
                                        <i class="layui-icon">&#xe640;</i>删除
                                    </a>
                                </td>
                            </tr>
                            {/volist}
                            {/if}
                            </tbody>
                        </table>
                    </div>
                    <div class="layui-tab-item">
                        <table class="layui-table" lay-size="sm">
                            <thead>
                            <tr>
                                <th width="80">ID</th>
                                <th>名称</th>
                                <th>等级</th>
                                <th>修为</th>
                                <th>成长</th>
                                <th>品质</th>
                                <th width="320">属性[生命/攻击/防御/暴击/吸血]</th>
                                <th width="130">出战增益[命/攻/防]</th>
                                <th width="160">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {if(count($listRolePets)<1)}
                            <tr>
                                <td colspan="9" align="center">暂无相关数据</td>
                            </tr>
                            {else /}
                            {volist name='listRolePets' id='vo' key='k'}
                            <tr>
                                <td>{$vo.cwid}</td>
                                <td>{$vo.cwname} {if $info['cw']==$vo.cwid}[出战]{/if}</td>
                                <td>{$vo.cwlv}</td>
                                <td>{$vo.cwexp}</td>
                                <td>{$vo.grow_up}</td>
                                <td>{$vo.cwpz}</td>
                                <td>
                                    <table lay-size="sm" style="text-align: center;width: 100%;">
                                        <tbody>
                                        <tr>
                                            <td width="30%">{$vo.cwhp}-{$vo.cwmaxhp}</td>
                                            <td width="20%">{$vo.cwgj}</td>
                                            <td width="20%">{$vo.cwfy}</td>
                                            <td width="15%">{$vo.cwbj}</td>
                                            <td width="15%">{$vo.cwxx}</td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </td>
                                <td>
                                    <table lay-size="sm" style="text-align: center;width: 100%;">
                                        <tbody>
                                        <tr>
                                            <td width="35%">{$vo.uphp}</td>
                                            <td width="35%">{$vo.upgj}</td>
                                            <td width="30%">{$vo.upfy}</td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </td>
                                <td>
                                    <a class="layui-btn layui-btn-xs layui-btn-danger ajax-del" data-url='{:url("delPets")}' data-field='id' data-value='{$vo.cwid}'>
                                        <i class="layui-icon">&#xe640;</i>删除
                                    </a>
                                </td>
                            </tr>
                            {/volist}
                            {/if}
                            </tbody>
                        </table>
                    </div>
                    <div class="layui-tab-item">
                        <table class="layui-table" lay-size="sm">
                            <thead>
                            <tr>
                                <th width="80">ID</th>
                                <th>名称</th>
                                <th>详情</th>
                                <th>等级</th>
                                <th>类型</th>
                                <th>种类</th>
                                <th>内容</th>
                                <th style="width: 670px;">奖励[装备/道具/药品/技能/修为/灵石]</th>
                                <th>进度</th>
                                <th>状态</th>
                                <th width="100">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {if(count($listRoleTask)<1)}
                            <tr>
                                <td colspan="11" align="center">暂无相关数据</td>
                            </tr>
                            {else /}
                            {volist name='listRoleTask' id='vo' key='k'}
                            <tr>
                                <td>{$vo.id}</td>
                                <td>{$vo.rwname}</td>
                                <td>{$vo.rwinfo}</td>
                                <td>{$vo.rwlv}</td>
                                <td>{$vo.rwlxName}</td>
                                <td>{$vo.rwzlName}</td>
                                <td>{$vo.rwyq_name}</td>
                                <td>
                                    <table lay-size="sm" style="width: 100%;">
                                        <tbody>
                                        <tr>
                                            <td style="width:160px;">
                                                {volist name="vo['rwzb_name']" id='val' key='key'}
                                                <p title="[id:{$val.id}]">[lv:{$val.lv}]{$val.name} x {$val.num}</p>
                                                {/volist}
                                            </td>
                                            <td style="width:160px;">
                                                {volist name="vo['rwdj_name']" id='val' key='key'}
                                                <p title="[id:{$val.id}]">{$val.name} x {$val.num}</p>
                                                {/volist}
                                            </td>
                                            <td style="width:100px;">
                                                {volist name="vo['rwyp_name']" id='val' key='key'}
                                                <p title="[id:{$val.id}]">[lv:{$val.lv}]{$val.name} x {$val.num}</p>
                                                {/volist}
                                            </td>
                                            <td>{$vo.rwjn_name}</td>
                                            <td width="10%">{$vo.rwexp}</td>
                                            <td width="10%">{$vo.rwyxb}</td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </td>
                                <td>{$vo.rwnowcount}</td>
                                <td>
                                    {if $vo.rwzt == 1}进行中{/if}
                                    {if $vo.rwzt == 3}已完成{/if}
                                </td>
                                <td>
                                    <a class="layui-btn layui-btn-xs layui-btn-danger ajax-del" data-url='{:url("delTask")}' data-field='id' data-value='{$vo.id}'>
                                        <i class="layui-icon">&#xe640;</i>删除
                                    </a>
                                </td>
                            </tr>
                            {/volist}
                            {/if}
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <!--  -->
        </div>
    </div>
</fieldset>
</body>
{/block}
{block name="script"}
<script>
    layui.use(['jquery', 'layajax', 'form', 'laydate', 'upload', 'element'], function () {
        var $ = layui.jquery
            , layajax = layui.layajax
            , laydate = layui.laydate
            , upload = layui.upload
            , element = layui.element
            , form = layui.form;

        $('.ajax-equip').on('click', function () {
            var value = $(this).data('value');
            var map = {};
            map['id'] = value;
            $.post('{:url("getRoleEquip")}', map, function (res) {
                console.log('res', res);

                if (res.code == undefined) {
                    console.log('res为json字符串', res);
                    res = JSON.parse(res);
                } else {
                    console.log('res为json对象', res);
                }
                if (res.code == 1) {
                    var ary = res.data;
                    var content = "<p><h3 style='color: #1E9FFF;font-weight: 600;'>" + ary.zbname + "</h3></p>" +
                        "<p><span style='color: #C2C2C2;'>穿戴等级:" + ary.zblv + "</span></p>" +
                        "<p><span style='color: #31BDEC;'>强化: +" + ary.qianghua + "</span></p>" +
                        "<p><hr></p>" +
                        "<p><span style='color: #FFB800;'>生命: +" + ary.zbhp + "</span></p>" +
                        "<p><span style='color: #FFB800;'>攻击: +" + ary.zbgj + "</span></p>" +
                        "<p><span style='color: #FFB800;'>防御: +" + ary.zbfy + "</span></p>" +
                        "<p><span style='color: #FFB800;'>暴击: +" + ary.zbbj + "</span></p>" +
                        "<p><span style='color: #FFB800;'>吸血: +" + ary.zbxx + "</span></p>" +
                        "<p><span style='color: #FFB800;'>速度: +" + ary.zbsd + "</span></p>" +
                        "<p><hr></p>" +
                        "<p><span>" + ary.zbinfo + "</span></p>";

                    layer.open({
                        type: 1,
                        title: false,
                        closeBtn: 0,
                        shadeClose: true,
                        skin: 'yourclass',
                        content: '<div style="width: 200px;height: 300px;padding: 10px;box-sizing: border-box;">' + content + '</div>'
                    });
                } else {
                    layer.msg(res.msg);
                }

            });
        });

        $('.ajax-edit').on('click', function () {
            var obj = $(this);
            var title = obj.html();
            var url = obj.data('url');
            var field = obj.data('field');
            var value = obj.data('value');

            console.log('url', url);

            layer.open({
                type: 2,
                title: title,
                shadeClose: true, //是否点击遮罩关闭 默认：false
                maxmin: false, //开启最大化最小化按钮 默认：false
                area: ['500px', '400px'],
                content: url + '?' + field + '=' + value,
                btn: ['确定', '取消'],
                yes: function (index, layero) {
                    var n = $(layero).find('iframe')[0];
                    var obja = $(n).contents().find("input[name='id']");
                    var objb = $(n).contents().find("input[name='sum']");
                    var id = $(obja).val();
                    var sum = $(objb).val();

                    console.log('id', id);
                    console.log('sum', sum);

                    $.post(url, {'id': id, 'sum': sum}, function (res) {
                        if (res.code == undefined) {
                            console.log('res为json字符串', res);
                            res = JSON.parse(res);
                        } else {
                            console.log('res为json对象', res);
                        }
                        if (res.code == 1) {
                            layer.close(index);
                            layer.msg(res.msg, {icon: 1, time: 2000}, function (index) {
                                location.reload();
                            });
                        } else {
                            layer.close(index);
                            layer.msg(res.msg);
                        }
                    });
                },
                btn2: function (index, layero) {
                    layer.close(index);
                },
                cancel: function () {
                    //右上角关闭回调
                    return true //开启该代码可禁止点击该按钮关闭
                }
            });
        });

        form.render();
    });
</script>
{/block}